package org.extreme.schooltalk;

import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TextView;

public class TopController {
	ImageButton leftBtn,rightBtn;
	
	public TopController(View topView,String title,int leftImgResId,int rightImgResId){
		
		if(topView!=null){
			((TextView)topView.findViewById(R.id.top_title)).setText(title);		
			if(leftImgResId!=-1){
				ImageButton left = ((ImageButton)topView.findViewById(R.id.top_left));
				left.setImageResource(leftImgResId);
				left.setVisibility(View.VISIBLE);
				this.leftBtn = left;
			}
			if(rightImgResId!=-1){
				ImageButton right = ((ImageButton)topView.findViewById(R.id.top_right));
				right.setImageResource(rightImgResId);
				right.setVisibility(View.VISIBLE);
				this.rightBtn = right;
			}//
		}//
		
	}
	
	
}
